具有iOS 5标准幻灯片切换动画的UIPageViewController替代方案 您所在的位置:网站首页 uipageviewcontroller 替代 具有iOS 5标准幻灯片切换动画的UIPageViewController替代方案

具有iOS 5标准幻灯片切换动画的UIPageViewController替代方案

#具有iOS 5标准幻灯片切换动画的UIPageViewController替代方案| 来源: 网络整理| 查看: 265

我正在为iOS 5制作一个应用程序,它一次只显示一个UIViewController,没有导航栏。

除了只为iOS 5提供页面卷曲过渡动画之外,UIPageViewController几乎完美地满足了我想要实现的目标。

我找到了一个替代方案,但它有点老套。我创建了一个UINavigationController并将导航栏设置为隐藏。

向前导航时,我调用

[navigationController setViewControllers:@[newVC] animated:YES];

在向后导航时,我调用

[self.navigationController setViewControllers:@[prevVC, currentVC] animated:NO]; [self.navigationController popViewControllerAnimated:YES];

这个hack似乎起作用了,给了我想要的确切过渡,但必须有更好的方法。

我认为另一种选择是使用UIView动画块。但这需要更多的工作。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有